
	/***********************************************************************************************

		@API
		Class: jsl.Event

		Methods:
			stopListeners  	()
			stopAction     	()
			stopSequence		()
			stopPropagation	()

	************************************************************************************************/

	//-------------------------------------------------------------------------------
	jsl.Class("jsl.Event", {

		//data
		//-------------------------------------------------------------------------------
		eventId: "",

		//private data
		//-------------------------------------------------------------------------------
		__listeners:		true,
		__action:				true,
		__sequence:			true,
		__propagation:	true,

		//-------------------------------------------------------------------------------
		stopListeners: 		function() { this.__listeners = false; 		return this },
		//-------------------------------------------------------------------------------
		stopAction: 			function() { this.__action = false; 			return this },
		//-------------------------------------------------------------------------------
		stopSequence: 		function() { this.__sequence = false; 		return this },
		//-------------------------------------------------------------------------------
		stopPropagation: 	function() { this.__propagation = false;	return this },

		//-------------------------------------------------------------------------------
		Event: function(data) {
			//!
			if(arguments.length > 1)	throw jsl.ParamError()//!

			if(arguments.length)
				if(data instanceof jsl.Event)
					return data

				else {//!
					jsl.validate(data, "o", data)//!

					for(var id in data)
						if(data.hasOwnProperty(id))
							this[id] = data[id]
				}
		}
	})
